package org.jeecg.modules.music.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.api.vo.songs.MP3DetailVo;
import org.jeecg.modules.api.vo.lyric.LyricVo;
import org.jeecg.modules.api.vo.songs.SongsDetailVo;
import org.jeecg.modules.music.entity.MusSong;
import org.jeecg.modules.music.entity.dto.HomeMusCountDto;

import java.util.List;

public interface MusSongMapper extends BaseMapper<MusSong> {

    List<SongsDetailVo> queryAPISongDetail(String[] ids);

    LyricVo getLyric(@Param("id") String id);

    /**获取MP3文件**/
    MP3DetailVo getMP3Url(@Param("songId") String id);

    List<SongsDetailVo> querySimilarSongs(@Param("songId") String id,@Param("singerId") String singerId, @Param("composer") String composer, @Param("lyricist") String lyricist);

    List<SongsDetailVo> querySongsByAlbumId(@Param("albumId") String id);

    List<SongsDetailVo> getSongsListByAlbumId(@Param("albumId") String albumId);

    List<SongsDetailVo> getSongsByArtistId(@Param("artistId") String id);

    Integer countSongs();

    List<SongsDetailVo> searchSuggestSongs(@Param("keywords") String keywords);

    List<SongsDetailVo> searchSongs(@Param("keywords") String keywords, @Param("limit") Integer limit,@Param("offset") Integer offset);

    List<SongsDetailVo> querySongsByUserId(@Param("uid") String uid);

    List<HomeMusCountDto> queryGroupLanguage();

    List<HomeMusCountDto> queryGroupGenre();
}
